package com.itheima.evaluate.controller;

import com.car.model.mongo.acccomment.dtos.AccCommentDto;
import com.heima.model.common.dtos.ResponseResult;
import com.itheima.apis.evaluate.comment.AccCommentControllerApi;
import com.itheima.evaluate.service.AccCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/accEvaluation")
public class AccCommentController implements AccCommentControllerApi {


    @Autowired
    AccCommentService accCommentService;
    /**
     * 保存评论信息
     * @param dto
     * @return
     */
    @PostMapping("/accComment")
    @Override
    public ResponseResult saveComment(@RequestBody AccCommentDto dto) {
        return accCommentService.saveComment(dto);
    }
}
